// vite.config.ts
import { defineConfig, loadEnv } from "file:///D:/PersonalFile/develop/code/%E7%A1%85%E8%B0%B7%E7%94%84%E9%80%89/%E8%87%AA%E5%BB%BA/vue3_admin_template/project/node_modules/.pnpm/registry.npmmirror.com+vite@4.4.11_sass@1.69.4/node_modules/vite/dist/node/index.js";
import vue from "file:///D:/PersonalFile/develop/code/%E7%A1%85%E8%B0%B7%E7%94%84%E9%80%89/%E8%87%AA%E5%BB%BA/vue3_admin_template/project/node_modules/.pnpm/registry.npmmirror.com+@vitejs+plugin-vue@4.4.0_vite@4.4.11_vue@3.3.4/node_modules/@vitejs/plugin-vue/dist/index.mjs";
import path from "path";
import { createSvgIconsPlugin } from "file:///D:/PersonalFile/develop/code/%E7%A1%85%E8%B0%B7%E7%94%84%E9%80%89/%E8%87%AA%E5%BB%BA/vue3_admin_template/project/node_modules/.pnpm/registry.npmmirror.com+vite-plugin-svg-icons@2.0.1_vite@4.4.11/node_modules/vite-plugin-svg-icons/dist/index.mjs";
import DefineOptions from "file:///D:/PersonalFile/develop/code/%E7%A1%85%E8%B0%B7%E7%94%84%E9%80%89/%E8%87%AA%E5%BB%BA/vue3_admin_template/project/node_modules/.pnpm/registry.npmmirror.com+unplugin-vue-define-options@1.3.18_rollup@2.79.1_vue@3.3.4/node_modules/unplugin-vue-define-options/dist/vite.mjs";
import { viteMockServe } from "file:///D:/PersonalFile/develop/code/%E7%A1%85%E8%B0%B7%E7%94%84%E9%80%89/%E8%87%AA%E5%BB%BA/vue3_admin_template/project/node_modules/.pnpm/registry.npmmirror.com+vite-plugin-mock@2.9.6_mockjs@1.1.0_rollup@2.79.1_vite@4.4.11/node_modules/vite-plugin-mock/dist/index.js";
var vite_config_default = defineConfig(({ command, mode }) => {
  let env = loadEnv(mode, process.cwd());
  return {
    plugins: [
      vue(),
      createSvgIconsPlugin({
        // Specify the icon folder to be cached
        iconDirs: [path.resolve(process.cwd(), "src/assets/icons")],
        // Specify symbolId format
        symbolId: "icon-[dir]-[name]"
      }),
      DefineOptions(),
      viteMockServe({
        localEnabled: command === "serve"
      })
    ],
    resolve: {
      alias: {
        "@": path.resolve("./src")
        // 相对路径别名配置，使用 @ 代替 src
      }
    },
    // scss 全局变量$的配置
    css: {
      preprocessorOptions: {
        scss: {
          javascriptEnabled: true,
          additionalData: '@import "./src/styles/variable.scss";'
        }
      }
    },
    // 代理跨域配置
    server: {
      proxy: {
        //被代理的接口地址
        [env.VITE_APP_BASE_API]: {
          // 代理的目标地址
          target: env.VITE_SERVER,
          // 是否代理跨域
          changeOrigin: true,
          // 重写路径 将/dev-api重写为空
          rewrite: (path2) => path2.replace(new RegExp(`^${env.VITE_APP_BASE_API}`), "")
        }
      }
    }
  };
});
export {
  vite_config_default as default
};
//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsidml0ZS5jb25maWcudHMiXSwKICAic291cmNlc0NvbnRlbnQiOiBbImNvbnN0IF9fdml0ZV9pbmplY3RlZF9vcmlnaW5hbF9kaXJuYW1lID0gXCJEOlxcXFxQZXJzb25hbEZpbGVcXFxcZGV2ZWxvcFxcXFxjb2RlXFxcXFx1Nzg0NVx1OEMzN1x1NzUwNFx1OTAwOVxcXFxcdTgxRUFcdTVFRkFcXFxcdnVlM19hZG1pbl90ZW1wbGF0ZVxcXFxwcm9qZWN0XCI7Y29uc3QgX192aXRlX2luamVjdGVkX29yaWdpbmFsX2ZpbGVuYW1lID0gXCJEOlxcXFxQZXJzb25hbEZpbGVcXFxcZGV2ZWxvcFxcXFxjb2RlXFxcXFx1Nzg0NVx1OEMzN1x1NzUwNFx1OTAwOVxcXFxcdTgxRUFcdTVFRkFcXFxcdnVlM19hZG1pbl90ZW1wbGF0ZVxcXFxwcm9qZWN0XFxcXHZpdGUuY29uZmlnLnRzXCI7Y29uc3QgX192aXRlX2luamVjdGVkX29yaWdpbmFsX2ltcG9ydF9tZXRhX3VybCA9IFwiZmlsZTovLy9EOi9QZXJzb25hbEZpbGUvZGV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